<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean id="user" class="com.model.UserData" scope="session" />
<jsp:setProperty name="user" property="*" />
<%
	String tgtPage = null;
	if (!user.getUsername().equals("Nam")) {
		tgtPage = "/SpringMVC/Dispatcher";
		response.sendRedirect(tgtPage);
	}
%>

<HTML>
<BODY>
<FORM METHOD=POST ACTION="/SpringMVC/result">
What's your name? <INPUT TYPE=TEXT NAME=username
         SIZE=20 VALUE="<%= user.getUsername() %>"><BR>
What's your e-mail address? <INPUT TYPE=TEXT
         NAME=email SIZE=20
         VALUE="<%= user.getEmail() %>"><BR>
What's your age? <INPUT TYPE=TEXT NAME=age
         SIZE=4 VALUE=<%= user.getAge() %>>
<P><INPUT TYPE=SUBMIT>
</FORM>
</BODY>
</HTML>

<!-- <HTML>
<BODY>
	<A HREF="NextPage">Continue</A>
</BODY>
</HTML> -->